{{useCss "/app-pages/css/user/comments.scss"}}
<div class="mainbox">
    <div class="_comment">
        {{#if !$Cache.user.comments.evaluations.length}}
        <p>暂无发表任何评价</p>
        {{#else}} {{#each $Cache.user.comments.evaluations}}
        <div class="commentitem">
            <div class="obj">
                <h3>评价等级:{{star_num}}</h3>
                <div class="item">
                    <div class="i">商家:{{goods.bus_id}}</div>
                    <div class="i">商品:
                        <href to="/goods_details.html?id={{goods._id}}">{{goods.goods_name}}</href>
                    </div>
                </div>
                <div class="item">
                    价格:{{goods.price}}
                </div>
                <div class="item">
                    时间:{{#Time comment.create_time,"YYYY-MM-DD HH:mm:ss"}}
                </div>
                <div class="item">
                    评价内容:{{comment.content}}
                </div>
            </div>
            <div class="_reply">
                {{#if comment.comments.length}} {{#each comment.comments}}
                <replynode></replynode>
                {{/each}}{{#else}}
                <p>暂无评论</p>
                {{/if}}
            </div>
        </div>
        {{/each}} {{/if}}
    </div>
</div>

<xmp type="tag" name="replynode">
    <div class="replyitem">
        <div class="replychild">
            <div class="replyer"><b>{{commenter_info.name}}</b>
            </div>
            {{content}}
        </div>
        {{#if comments.length}} {{#each comments}}
        <div class="replychild">
            <div class="replyer"><b>{{commenter_info.name}}</b>
            </div>
            {{content}}
        </div>
        {{/each}} {{/if}}
        <L:input placeholder="回复" bind-input="{{'_reply_content'}}" value="{{_reply_content}}"></L:input>
        <button event-click="{{'$Top.$Event.user.comments.reply'}}" class="btn">提交</button>
    </div>
</xmp>
